package com.albaba.designpattern.chain_of_responsibility.text_001;

/**
 * @author zx
 * @version 1.0
 * @description TODO
 * @date 2025/2/24 21:27
 */
public class Client {

    public static void main(String[] args) {
        Handler h1 = new HandleA();
        Handler h2 = new HandleB();
        Handler h3 = new HandleC();

        // 创建处理链
        h1.setSuccessor(h2);
        h2.setSuccessor(h3);

        RequestData data = new RequestData("请求数据:A-B-C-D");

        h1.handle(data);

    }
}
